Skip to content

[INTERNAL] SessionRetry: Adds support to yield immediately after the original attempt when READ_SESSION_NOT_AVAILABLE error is thrown#5201

Merged
kirankumarkolli merged 13 commits into
masterfrom
users/dibahl/SessionRetryPolicyEarlyYield
May 20, 2025
Merged

[INTERNAL] SessionRetry: Adds support to yield immediately after the original attempt when READ_SESSION_NOT_AVAILABLE error is thrown#5201
kirankumarkolli merged 13 commits into
masterfrom
users/dibahl/SessionRetryPolicyEarlyYield

Conversation

@dibahlfi

Copy link
Copy Markdown
Member

Exposing MaxInRegionRetryCount variable internally so that if it has value of 0 or less than 0 we will not do any retry/delay and yield immediately for READ_SESSION_NOT_AVAILABLE error from the SessionTokenMismtatchInternalRetry policy.

SessionRetryEarlyYield.json

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good!

@kirankumarkolli kirankumarkolli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Session immediate yield its only for compute team and is making the types on the Policy type internal set

Comment thread Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs

@FabianMeiswinkel FabianMeiswinkel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Kiran's comment - Env-variable doesn't need to (or probabyl shouldn't) allow setting ot 0 or -1 - for now let us reduce the scope to just Compute Gw.

Comment thread Microsoft.Azure.Cosmos/src/SessionRetryOptions.cs Outdated
@kirankumarkolli kirankumarkolli changed the title Fix: Add support to yield immediately after the original attempt when READ_SESSION_NOT_AVAILABLE error is thrown [INTERNAL] SessionRetry: Add support to yield immediately after the original attempt when READ_SESSION_NOT_AVAILABLE error is thrown May 16, 2025
Comment thread Microsoft.Azure.Cosmos/src/SessionRetryOptions.cs Outdated
@dibahlfi dibahlfi changed the title [INTERNAL] SessionRetry: Add support to yield immediately after the original attempt when READ_SESSION_NOT_AVAILABLE error is thrown [INTERNAL] SessionRetry: Adds support to yield immediately after the original attempt when READ_SESSION_NOT_AVAILABLE error is thrown May 16, 2025
@kirankumarkolli kirankumarkolli merged commit ab51083 into master May 20, 2025
26 checks passed
@kirankumarkolli kirankumarkolli deleted the users/dibahl/SessionRetryPolicyEarlyYield branch May 20, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants